<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>美兰数据文化馆与图书馆</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/public.css" media="all">
    <link rel="shortcut icon" href="<%=request.getContextPath()%>/huazhi/images/favicon.ico"/>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-tab-content" style="height: auto">
                <form class="layui-form" lay-filter="component-form-element" action="">
                    <div class="layui-form-item">
                        <div class="layui-col-lg6">
                            <div class="layui-col-xs11">
                                <label class="layui-form-label">部门名称</label>
                                <div class="layui-input-block">
                                    <input type="text" name="departmentname" lay-verify="departmentname"
                                           id="departmentname"
                                           autocomplete="off" class="layui-input" disabled>
                                </div>
                            </div>
                        </div>
                    </div>
<%--                    <div class="layui-form-item">--%>
<%--                        <div class="layui-col-lg6">--%>
<%--                            <div class="layui-col-xs11">--%>
<%--                                <label class="layui-form-label">代码值</label>--%>
<%--                                <div class="layui-input-block">--%>
<%--                                    <input type="text" name="departmentcode" lay-verify="departmentcode"--%>
<%--                                           id="departmentcode"--%>
<%--                                           autocomplete="off" placeholder="请输入代码值" class="layui-input" disabled>--%>
<%--                                </div>--%>
<%--                            </div>--%>
<%--                        </div>--%>
<%--                    </div>--%>
                    <div class="layui-form-item">
                        <div class="layui-col-lg6">
                            <div class="layui-col-xs11">
                                <label class="layui-form-label">创建时间</label>
                                <div class="layui-input-block">
                                    <input name="createtime" id="createtime" lay-verify="createtime" autocomplete="off"
                                           class="layui-input" type="text" disabled>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-col-lg6">
                            <div class="layui-col-xs11">
                                <label class="layui-form-label">电话</label>
                                <div class="layui-input-block">
                                    <input name="phone" id="phone" autocomplete="off" class="layui-input" type="text"
                                            disabled>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-col-lg6">
                            <div class="layui-col-xs11">
                                <label class="layui-form-label">地址</label>
                                <div class="layui-input-block">
                                    <input name="address" id="address" autocomplete="off" class="layui-input"
                                           type="text"
                                            disabled>
                                </div>
                            </div>
                        </div>
                    </div>

                    <%--<div class="layui-form-item">--%>
                    <%--<div class="layui-input-block">--%>
                    <%--<div class="layui-footer" style="left: 0;">--%>
                    <%--<button class="layui-btn" lay-submit lay-filter="*" >立即提交</button>--%>
                    <%--&lt;%&ndash;<button type="reset" class="layui-btn layui-btn-primary">重置</button>&ndash;%&gt;--%>
                    <%--</div>--%>
                    <%--</div>--%>
                    <%--</div>--%>
                </form>
            </div>
        </div>
    </div>
</div>
<script src="<%=request.getContextPath()%>/huazhi/lib/layui-v2.5.5/layui.all.js"></script>
<script>
    function child(tid) {
        layui.use(['form', 'laydate'], function () {
            var $ = layui.$
                , form = layui.form
                , laydate = layui.laydate
                , layer = layui.layer;

            $.ajax({
                type: "post",
                url: "<%=request.getContextPath()%>/rest/system/selectDepartmentTid",
                dataType: "json",
                async: false,
                data: "tid=" + tid,
                success: function (data) {
                    form.val("component-form-element", data)
                    //日期
                    laydate.render({
                        elem: '#createtime',
                        btns: ['now', 'confirm'],
                        theme: 'molv',
                        value: data.createtimestring,
                        calendar: true
                    });
                }
            })
        });
    }
</script>
</body>
</html>